<html>
<head>
<#include "/common/common2.ftl"/>

</head>
<body>
	<div id="rrapp" v-cloak>
		<div v-show="showList">
			<div class="m-b-md">
				<form class="form-inline" role="form" id="searchForm" name="searchForm">
					<div class="form-group">
						<label class="control-label">
							<span class="h4 font-thin v-middle">角色名:</span>
						</label>
						<input class="form-control" id="name" name="name">
					</div>
					<a href="javascript:void(0)" @click="reload" class="btn btn-s-md btn-default btn-rounded" id="search">查询</a>
				</form>
			</div>
			<header class="panel-heading">
				<div class="doc-buttons">
					<button type="button" @click="del" class="btn btn-danger marR10">删除</button>
					<button type="button" @click="add" class="btn btn-primary marR10">新增</button>
					<button type="button" @click="update" class="btn btn-info marR10">编辑</button>
				</div>
			</header>
			<div class="table-responsive">
				<div id="paging" class="pagclass"></div>
			</div>
		</div>
		<div class="panel panel-default" v-show="!showList">
			<div class="panel-heading">{{title}}</div>
			<form class="form-horizontal">
				<div class="panel-body">
					<input type="hidden" v-model="role.id">
					<div class="form-group">
						<label class="col-sm-3 control-label">角色名</label>
						<div class="col-sm-9">
							<input type="text" class="form-control checkacc" required lay-verify="required" placeholder="请输入角色名" v-model="role.name">
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">roleKey</label>
						<div class="col-sm-9">
							<input type="text" class="form-control checkacc" required lay-verify="required" placeholder="请输入roleKey" v-model="role.rolekey">
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">描述</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" placeholder="请输入角色描述" v-model="role.description">
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<label class="col-sm-3 control-label">角色状态</label>
						<div class="col-sm-9">
							<select v-model="role.state" class="form-control" required lay-verify="required">
								<option value="0">是</option>
								<option value="1">否</option>
							</select>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
					<div class="form-group">
						<div class="col-sm-2 control-label">授权</div>
						<div class="col-sm-10">
							<ul id="menuTree" class="ztree"></ul>
						</div>
					</div>
					<div class="line line-dashed line-lg pull-in"></div>
				</div>
				<footer class="panel-footer text-right bg-light lter">
					<div class="form-group">
						<div class="col-sm-2 control-label"></div>
						<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定" />
						&nbsp;&nbsp;
						<input type="button" class="btn btn-warning" @click="reload" value="返回" />
					</div>
				</footer>
			</form>
		</div>
	</div>
	<script src="/js/system/role/role.js"></script>
</body></html>